package com.enlorenz.core.annotation.base;

import java.util.ArrayList;
import java.util.List;

import com.enlorenz.common.util.CommonContants;
import com.enlorenz.core.annotation.Property;

/**
 * 方法注释包装类
 * @author lcb
 */
public class AnnoMethodWrapper extends AnnoBaseWrapper{
	//输入参数列表
	@Property(name="注释方法参数列表",desc="用于存放注释方法参数",
			impl=AnnoParamWrapper.class)
	private List<AnnoParamWrapper> inputParamList;
	//返回参数
	@Property(name="注释返回对象",desc="用于存放注释返回对象")
	private AnnoParamWrapper returnParam;
	
	
	/**
	 * 添加注释包装类
	 * @param wrapper 注释包装类
	 */
	public void addAnnoParamWrapper(AnnoParamWrapper wrapper){
		if(null == inputParamList){
			inputParamList=new ArrayList<AnnoParamWrapper>();
		}
		inputParamList.add(wrapper);
	}
	
	public List<AnnoParamWrapper> getInputParamList() {
		return inputParamList;
	}
	public void setInputParamList(List<AnnoParamWrapper> inputParamList) {
		this.inputParamList = inputParamList;
	}
	public AnnoParamWrapper getReturnParam() {
		return returnParam;
	}
	public void setReturnParam(AnnoParamWrapper returnParam) {
		this.returnParam = returnParam;
	}
	
	public String toString(){
		return "Method:"+super.toString()+CommonContants.WRAP_SYMBOL+"ParamList:"+
				inputParamList+CommonContants.WRAP_SYMBOL+"Return:"+returnParam;
	}
}
